<form class="banning" method="POST" action="{:U('Modcp/banIP')}">
	<input type="hidden" name="op" value="include" />
    <table class="tb">
        <tr>
            <td width="120" align="right"><label for="ip">{$Think.lang.ip}:</label></td>
            <td><input id="ip" class="input" type="text" name="ip" size="30" value="" /></td>
        </tr>
        <tr>
            <td align="right"><label for="ban_length">{$Think.lang.mcp_ban_length}:</label></td>
            <td>
                <select id="ban_length" name="ban_length" style="width:220px;">
                    <option value="1">{$Think.lang.1_day}</option>
                    <option value="3">{$Think.lang.3_days}</option>
                    <option value="7">{$Think.lang.1_week}</option>
                    <option value="14">{$Think.lang.2_weeks}</option>
                    <option value="30">{$Think.lang.1_month}</option>
                    <option value="60">{$Think.lang.2_months}</option>
                    <option value="180">{$Think.lang.6_months}</option>
                    <option value="365">{$Think.lang.1_year}</option>
                </select>
            </td>
        </tr>
        <tr>
            <td align="right"><label for="ban_reason">{$Think.lang.mcp_ban_reason}:</label></td>
            <td><textarea id="ban_reason" class="textarea" name="ban_reason" rows="3" cols="80"></textarea></td>
        </tr>
        <tr>
            <td align="right" align="right"></td>
            <td><input id="btn-submit" class="button" type="submit" value="{$Think.lang.submit}" /><input class="alt-button" type="reset" value="{$Think.lang.reset}" /></td>
        </tr>
        <tr><td colspan="2"></td></tr>
        <tr><td colspan="2"></td></tr>
    </table>
</form>

<form method="POST" action="{:U('Modcp/banIP')}">
	<input type="hidden" name="op" value="exclude" />
	<notempty name="list">
	<h2>{$Think.lang.mcp_banned_ips}</h2>
	<div class="container">
	    <table class="tb tb-list">
	        <tr>
	            <th></th>
	            <th>{$Think.lang.ip}</th>
	            <th>{$Think.lang.create_time}</th>
	            <th>{$Think.lang.expire_time}</th>
	            <th>{$Think.lang.author}</th>
	            <th>{$Think.lang.ban_reason}</th>
	        </tr>
	        <volist name="list" id="vo">
	        <tr>
	        	<td class="mark"><input type="checkbox" name="mods[]" value="{$vo.id}" /></td>
	            <td><a href="javascript:ipToCountry('{$vo.value}');" title="{$Think.lang.view_ip}">{$vo.value}</a></td>
	            <td>{$vo.create_time|format_date}</td>
	            <td>{$vo.expire_time|format_date}</td>
	            <td><a href="{$vo.author_id|format_user_url=$vo['author_name']}">{$vo.author_name}</td>
	            <td><a href="javascript:void(0)" title="{$vo.reason|Input::forShow}">{$Think.lang.details}</a></td>
	        </tr>
	        </volist>
	    </table>
	</div>
	<div class="pagination">{$pagination}</div>
	<ul class="actions">
	    <li><input id="mark-all" name="mark_all" type="checkbox" value="1" /></li>
	    <li><input name="exclude" class="button" type="submit" value="{$Think.lang.mcp_ban_exclude}" /></li>
	</ul>
	</notempty>
</form>